<admintpl file="header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:U('Realuser/index')}">注册用户</a></li>
			<li><a href="{:U('Realuser/prizelist')}">中奖用户</a></li>
			<li><a href="{:U('Realuser/htRecharge')}">充值</a></li>
		</ul>
		<form class="well form-search js-ajax-form" method="post" action="{:U('Realuser/index')}">
			用户类型：
			<select class="select_2" name="user_status" style="width: 120px;">
				<option value='0'>全部</option>
				<foreach name="status" item="vo">
					<option <if condition="(I('param.user_status') eq $vo['id'])" >selected</if> value="{$vo.id}">{$vo.name}</option>
				</foreach>
			</select> &nbsp;&nbsp;
			登录时间：
            <input type="text" name="start_time" class="js-date" value="{:I('param.start_time')}" style="width: 90px;" autocomplete="off">-
            <input type="text" name="end_time" class="js-date"  value="{:I('param.end_time')}" style="width: 90px;" autocomplete="off"> &nbsp; &nbsp;
            昵称：
            <input type="text" name="keyword" style="width:90px;" value="{:I('param.keyword')}" placeholder="请输入昵称...">
            <input type="submit" class="btn btn-primary" value="搜索" />
            <if condition="$count">共查询到 {$count} 条数据 </if>
        	<button class="btn btn-primary js-ajax-submit" type="submit" data-action="{:U('Realuser/indexoutcsv')}">查询导出</button>
        </form>
		<form method="post" class="js-ajax-form">
			<div class="pagination">{$page}</div>
			<table class="table table-hover table-bordered">
				<thead>
					<tr>
						<th>ID</th>
						<th width="40">头像</th>
						<th>用户名/昵称</th>
						<th>电话/地址</th>
						<th>注册来源/日期</th>
						<th>登录时间/IP</th>
						<th>状态</th>
						<th width="80">操作</th>
					</tr>
				</thead>
				<tbody>
					<foreach name="lists" item="vo">
					<tr>
						<td>{$vo.id}</td>
						<td style="padding: 0;margin: 0;"><if condition="$vo['weixin_avatar']"><img src="{$vo['weixin_avatar']}"/></if></td>
						<td>{$vo.username}<br>{$vo.nickname}</td>
						<td>{$vo.phone}<br>{$vo.address}</td>
						<td>{$register_from[$vo['register_from']-1]['name']}<br>{$vo.created_at}</td>
						<td>{$vo.last_login}<br>{$vo.last_login_ip}</td>
						<td>{$status[$vo['status']-1]['name']}</td>
						<td>
							<div style="display: inline-block">
								<a href="{:U('Realuser/userinfo',array('id'=>$vo['id']))}">详细信息</a>
							</div>
							<div style="display: inline-block">
								<if condition="($roleid eq 1) OR ($roleid eq 3) OR ($roleid eq '')">
									<a href="{:U('Realuser/htRecharge',array('id'=>$vo['id']))}">充值</a>
									<else />
								</if>

							</div>
						</td>
					</tr>
					</foreach>
				</tbody>
				<thead>
					<tr>
						<th>ID</th>
						<th width="40">头像</th>
						<th>用户名/昵称</th>
						<th>电话/地址</th>
						<th>注册来源/日期</th>
						<th>登录时间/IP</th>
						<th>状态</th>
						<th width="30">操作</th>
					</tr>
				</thead>
			</table>
			<div class="pagination">{$page}</div>
		</form>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>
